Skip to content

refactor: streamline agent host completion variable handling and improve attachment rendering logic#320717

Merged
DonJayamanne merged 2 commits into
mainfrom
don/narrow-termite
Jun 10, 2026
Merged

refactor: streamline agent host completion variable handling and improve attachment rendering logic#320717
DonJayamanne merged 2 commits into
mainfrom
don/narrow-termite

Conversation

@DonJayamanne

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 10, 2026 03:46
@DonJayamanne DonJayamanne self-assigned this Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors how “agent host completion” references (skills/commands) are represented as chat request variables, and adjusts attachment rendering so these completion references are treated as hidden variables rather than visible attachments in the chat UI.

Changes:

  • Introduces toAgentHostCompletionVariableEntry* helpers to centralize ID/value creation for agent-host completion variables.
  • Updates agent-host input completion handlers and session-state adapters to use the new helpers and to restore completion references from attachment metadata.
  • Updates attachment rendering logic (and adds tests) to avoid rendering agent-host completion references as visible attachments.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatAttachmentsContentPart.test.ts Adds coverage ensuring agent-host completion references are not rendered as attachments.
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts Refactors variable construction in tests and adds coverage for restoring hidden completion variables from session state.
src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.ts Adds helper functions to create agent-host completion variable entries (IDs, values, metadata).
src/vs/workbench/contrib/chat/browser/widget/input/editor/agentHostInputCompletions.ts Uses the new helper for consistent completion variable ID/value generation.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.ts Filters agent-host completion variables out of the renderable attachments list.
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts Converts command/skill “simple” message attachments into hidden completion variable entries when rebuilding variable data.
src/vs/sessions/contrib/chat/browser/agentHostInputCompletions.ts Uses the new helper to construct agent-host completion variable entries consistently in the Sessions app.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 1

@DonJayamanne DonJayamanne marked this pull request as ready for review June 10, 2026 04:18
@DonJayamanne DonJayamanne enabled auto-merge (squash) June 10, 2026 04:18
@DonJayamanne DonJayamanne merged commit dd2b63d into main Jun 10, 2026
25 checks passed
@DonJayamanne DonJayamanne deleted the don/narrow-termite branch June 10, 2026 07:22
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants